import TabsView from '@/layouts/tabs/TabsView';
// import BlankView from '@/layouts/BlankView';
import PageView from '@/layouts/PageView';

// 路由配置
const options = {
  routes: [
    {
      path: '/login',
      name: '登录页',
      component: () => import('@/pages/login'),
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '500',
      name: '500',
      component: () => import('@/pages/exception/500'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: '/login',
      children: [
        {
          path: 'personal',
          name: '个人中心',
          meta: {
            invisible: true,
          },
          component: () => import('@/pages/personal/index'),
        },
        {
          path: 'administrator',
          name: '管理员',
          meta: {
            icon: 'idcard',
          },
          component: PageView,
          children: [
            {
              path: 'list',
              name: '管理员列表',
              meta: {
                icon: 'unordered-list',
              },
              component: () => import('@/pages/administrator/index'),
            },
          ],
        },
        {
          path: 'user',
          name: '用户管理',
          meta: {
            icon: 'user',
          },
          component: PageView,
          children: [
            {
              path: 'list',
              name: '用户列表',
              meta: {
                icon: 'team',
              },
              component: () => import('@/pages/user/list'),
            },
            {
              path: 'answer',
              name: '问答管理',
              meta: {
                icon: 'question',
              },
              component: () => import('@/pages/user/answer'),
            },
          ],
        },
        {
          path: 'playground',
          name: '广场',
          meta: {
            icon: 'bank',
          },
          component: PageView,
          children: [
            {
              path: 'banner',
              name: '轮播图管理',
              meta: {
                icon: 'retweet',
              },
              component: () => import('@/pages/playground/banner'),
            },
            {
              path: 'topic',
              name: '话题管理',
              meta: {
                icon: 'sound',
              },
              component: () => import('@/pages/playground/topic'),
            },
            {
              path: 'topic/type',
              name: '话题分类管理',
              meta: {
                icon: 'ordered-list',
              },
              component: () => import('@/pages/playground/type'),
            },
            {
              path: 'topic/comment',
              name: '话题评论管理',
              meta: {
                icon: 'edit',
              },
              component: () => import('@/pages/playground/comment'),
            },
            {
              path: 'topic/reply',
              name: '评论回复管理',
              meta: {
                icon: 'form',
              },
              component: () => import('@/pages/playground/reply'),
            },
          ],
        },
        {
          path: 'order',
          name: '订单管理',
          meta: {
            icon: 'account-book',
          },
          component: PageView,
          children: [
            {
              path: 'like',
              name: '购买超喜欢',
              meta: {
                icon: 'heart',
              },
              component: () => import('@/pages/order/like'),
            },
            {
              path: 'vip',
              name: '开通VIP',
              meta: {
                icon: 'crown',
              },
              component: () => import('@/pages/order/vip'),
            },
          ],
        },
        {
          path: 'setting',
          name: '系统设置',
          meta: {
            icon: 'setting',
          },
          component: PageView,
          children: [
            {
              path: 'price',
              name: '价格管理',
              meta: {
                icon: 'pay-circle',
              },
              component: () => import('@/pages/setting/price'),
            },
          ],
        },
      ],
    },
  ],
};

export default options;
